package com.sojson.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.sojson.base.impl.BaseDaoImpl;
import com.sojson.dao.ActivityUserDao;
import com.sojson.entity.po.ActivityUser;

/**
 * 券可用用户Dao实现类(目的:把分页插件从Service层分离,这样就不用每次调Dao接口都要分页)
 * 
 * @author liu
 * @date 2021-06-08
 */
@Repository
public class ActivityUserDaoImpl extends BaseDaoImpl<ActivityUserDao, ActivityUser> implements ActivityUserDao {

    @Resource
    private ActivityUserDao activityUserDao;

    /**
     * 单条插入
     * 
     * @param activityUser
     * @return
     */
    @Override
    public int insert(ActivityUser activityUser) {
        return activityUserDao.insert(activityUser);
    }

    /**
     * 批量插入
     * 
     * @param activityUser
     * @return
     */
    @Override
    public int insertList(List<ActivityUser> activityUsers) {
        return activityUserDao.insertList(activityUsers);
    }

    /**
     * 通过对象批量删除(物理删除)
     * 
     * @param activityUser
     * @return
     */
    @Override
    public int deleteByDto(ActivityUser activityUser) {
        return activityUserDao.deleteByDto(activityUser);
    }

    /**
     * 统计全部数量
     * 
     * @return
     */
    @Override
    public int countAll() {
        return activityUserDao.countAll();
    }

    /**
     * 查询所有
     * 
     * @return
     */
    @Override
    public List<ActivityUser> listAll() {
        return activityUserDao.listAll();
    }

    /**
     * 根据对象统计数量
     * 
     * @param activityUser
     * @return
     */
    @Override
    public int countByDto(ActivityUser activityUser) {
        return activityUserDao.countByDto(activityUser);
    }

    /**
     * 根据对象查询
     * 
     * @param activityUser
     * @return
     */
    @Override
    public List<ActivityUser> listByDto(ActivityUser activityUser) {
        startPage(activityUser);
        return activityUserDao.listByDto(activityUser);
    }

    /**
     * 通过id删除(物理删除)
     * 
     * @param id
     * @return
     */
    @Override
    public int deleteById(Integer id) {
        return activityUserDao.deleteById(id);
    }

    /**
     * 通过id数组删除(物理删除)
     * 
     * @param ids
     * @return
     */
    @Override
    public int deleteByIds(Integer[] ids) {
        return activityUserDao.deleteByIds(ids);
    }

    /**
     * 通过id更新(全部更新)
     * 
     * @param activityUser
     * @return
     */
    @Override
    public int updateAllById(ActivityUser activityUser) {
        return activityUserDao.updateAllById(activityUser);
    }

    /**
     * 通过id列表更新(全部更新)(更新内容相同)
     * 
     * @param activityUser
     * @return
     */
    @Override
    public int updateAllByIdList(ActivityUser activityUser) {
        return activityUserDao.updateAllByIdList(activityUser);
    }

    /**
     * 通过id列表更新(全部更新)(更新内容不相同)
     * 
     * @param activityUsers
     * @return
     */
    @Override
    public int updateDtoListAllById(List<ActivityUser> activityUsers) {
        return activityUserDao.updateDtoListAllById(activityUsers);
    }

    /**
     * 通过id更新(局部更新)
     * 
     * @param activityUser
     * @return
     */
    @Override
    public int updateById(ActivityUser activityUser) {
        return activityUserDao.updateById(activityUser);
    }

    /**
     * 通过id列表更新(局部更新)(更新内容相同)
     * 
     * @param activityUser
     * @return
     */
    @Override
    public int updateByIdList(ActivityUser activityUser) {
        return activityUserDao.updateByIdList(activityUser);
    }

    /**
     * 通过id列表更新(局部更新)(更新内容不相同)
     * 
     * @param activityUsers
     * @return
     */
    @Override
    public int updateDtoListById(List<ActivityUser> activityUsers) {
        return activityUserDao.updateDtoListById(activityUsers);
    }

    /**
     * 通过id查询
     * 
     * @param id
     * @return
     */
    @Override
    public ActivityUser findById(Integer id) {
        return activityUserDao.findById(id);
    }

    /**
     * 通过id数组查询
     * 
     * @param ids
     * @return
     */
    @Override
    public List<ActivityUser> findByIds(Integer[] ids) {
        return activityUserDao.findByIds(ids);
    }

    /**
     * 通过对象查询id列表
     * 
     * @param activityUser
     * @return
     */
    @Override
    public List<Integer> findIdByDto(ActivityUser activityUser) {
        startPage(activityUser);
        return activityUserDao.findIdByDto(activityUser);
    }

    /**
     * 清空数据(物理清空)
     */
    @Override
    public int clear() {
        return activityUserDao.clear();
    }

    /**
     * 批量插入
     * 
     * @param activityUser
     * @return
     */
    @Override
    public int insertAll(ActivityUser activityUser) {
        return activityUserDao.insertAll(activityUser);
    }

    /**
     * 根据对象查询
     * 
     * @param activityUser
     * @return
     */
    @Override
    public List<ActivityUser> list(ActivityUser activityUser) {
        startPageDefaultSort(activityUser);
        return activityUserDao.list(activityUser);
    }

}